Developer Documentation

QuickTime 4 API Documentation

Programming With QuickTime VR

| Previous | Chapter Contents | Chapter Top | Next |

Mouse Over Hot Spot Procedure

Your application can define a mouse over hot spot procedure that is called when the cursor is over a hot spot.

MyMouseOverHotSpotProc

The mouseOverHotSpotProc parameter to the QTVRSetMouseOverHotSpotProc function specifies an application-defined mouse over hot spot procedure.

pascal OSErr MyMouseOverHotSpotProc (
                     QTVRInstance qtvr,
                     UInt32 hotSpotID,
                     UInt32 flags,
                     SInt32 refCon);
qtvr
An instance of a QuickTime VR movie.
hotSpotID
The ID of the hot spot over which the cursor has been moved.
flags
A hot spot action selector. See "Hot Spot Action Selectors" for a description of the available selectors.
refCon
A reference constant. This is the same value that your application passed in the refCon parameter when it called QTVRSetMouseOverHotSpotProc to install this callback routine.
function result
A result code that indicates whether QuickTime VR should perform the actions it normally performs when the cursor is over a hot spot ( noErr ) or not (any nonzero value).

DESCRIPTION

Your MyMouseOverHotSpotProc routine is called whenever the user moves the cursor over a hot spot, keeps it over a hot spot, or moves it out of a hot spot. The user action that caused your routine to be called is specified by the hot spot action selector passed in the flags parameter. For instance, when the cursor is first moved over a hot spot, your routine is called with flags set to kQTVRHotSpotEnter . Similarly, until the cursor is moved back off that hot spot, your routine is called repeatedly with flags set to kQTVRHotSpotWithin . Your routine should perform whatever actions it likes and return the value noErr if you want QuickTime VR to perform whatever actions it normally performs in that circumstance. Your routine should return any nonzero value to suppress those actions.

Your mouse over hot spot procedure is called only for enabled hot spots.

SEE ALSO

Use QTVRSetMouseOverHotSpotProc to install or remove a mouse over hot spot procedure. Use QTVREnableHotSpot to enable or disable a hot spot.


© 1998 Apple Computer, Inc.

| Previous | Chapter Contents | Chapter Top | Next |